<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>event</title>
    <script src="https://cdn.bootcss.com/vue/2.6.10/vue.js"></script>
</head>
<body>
<div id="app">
    <!--
    差值表达式
    -->
    {{sum}}<br>
    {{sum>10?'大于10':'小于10'}}<br>
    <!--
    @click 指定点击时间要执行的方法
    -->
    <button type="button" @click="increment(1)">增加</button>
</div>
</body>
<script>
    new Vue({
        el: "#app",
        data: {
            sum: 0
        },
        methods: {
            //delete 步长
            increment:function (deleta) {
                this.sum += deleta;
            }
        }
    });
</script>
</html>